Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use require.JSONEq instead of require.Equal for the JSON string #2100

Merged
merged 4 commits into from
Feb 13, 2024

Conversation

jihuayu
Copy link
Member

@jihuayu jihuayu commented Feb 13, 2024

I have used require.JSONEq instead of require.Equal for the JSON string.
We don't need to test the order of the elements in the JSON.

git-hulk
git-hulk previously approved these changes Feb 13, 2024
Copy link
Member

@git-hulk git-hulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

tisonkun
tisonkun previously approved these changes Feb 13, 2024
Copy link
Member

@PragmaTwice PragmaTwice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least in some test cases, we need to validate the indent and spaces of the output JSON. And JSONEq will just ignore all of them.

For exmaple, all cases in JSON.GET with options.

@jihuayu jihuayu dismissed stale reviews from tisonkun and git-hulk via b84b771 February 13, 2024 08:29
@jihuayu
Copy link
Member Author

jihuayu commented Feb 13, 2024

At least in some test cases, we need to validate the indent and spaces of the output JSON. And JSONEq will just ignore all of them.

For exmaple, all cases in JSON.GET with options.

Thank you, I fixed it.

Copy link

sonarcloud bot commented Feb 13, 2024

@tisonkun tisonkun merged commit cf2f4ad into apache:unstable Feb 13, 2024
30 checks passed
JoverZhang pushed a commit to JoverZhang/kvrocks that referenced this pull request Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants